<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>LOBO: instructionsimple.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">LOBO
   &#160;<span id="projectnumber">0.1</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">instructionsimple.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="instructionsimple_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef INSTRUCTIONSIMPLE_H</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define INSTRUCTIONSIMPLE_H</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00011"></a>00011 <span class="preprocessor">#include &quot;<a class="code" href="fonction_8h.html" title="Classe qui représente une fonction au sens LOBO, et contient la liste d&#39;instructionsimple de la fonct...">fonction.h</a>&quot;</span>
<a name="l00012"></a>00012 <span class="preprocessor">#include &quot;<a class="code" href="trim_8h.html" title="Classe qui contient des fonctions permettant de supprimer les caractères blancs.">trim.h</a>&quot;</span>
<a name="l00013"></a>00013 <span class="preprocessor">#include &lt;time.h&gt;</span>
<a name="l00014"></a>00014 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
<a name="l00015"></a>00015 <span class="preprocessor">#include &lt;regex.h&gt;</span>
<a name="l00016"></a>00016 <span class="preprocessor">#include &lt;algorithm&gt;</span>
<a name="l00017"></a>00017 
<a name="l00018"></a>00018 <span class="keyword">using namespace </span>std;
<a name="l00019"></a>00019 
<a name="l00020"></a><a class="code" href="classinstructionsimple.html">00020</a> <span class="keyword">class </span><a class="code" href="classinstructionsimple.html">instructionsimple</a>
<a name="l00021"></a>00021 {
<a name="l00022"></a>00022 <span class="keyword">private</span>:
<a name="l00023"></a>00023   <span class="keywordtype">string</span> type; <span class="comment">/*Type de l&#39;instructionsimple parmi AFFECTE AFFICHE APPEL ...*/</span>
<a name="l00024"></a>00024   <span class="keywordtype">string</span> inst; <span class="comment">/*Contenu de l&#39;instruction */</span>
<a name="l00025"></a>00025   <a class="code" href="classfonction.html">fonction</a> * fun; <span class="comment">/*Pointeur sur la fonction à laquelle l&#39;instructionsimple appartient*/</span>
<a name="l00026"></a>00026   vector&lt;string&gt; elements; <span class="comment">/*Contient les éléments de inst */</span>
<a name="l00027"></a>00027   stringstream flux_erreur; <span class="comment">/*Le flux où sont écrites les erreur */</span>
<a name="l00028"></a>00028   
<a name="l00029"></a>00029   <span class="keywordtype">bool</span> valide; <span class="comment">/*Valeur de validité de l&#39;instructionsimple */</span>
<a name="l00030"></a>00030   
<a name="l00031"></a>00031 <span class="keyword">public</span>:
<a name="l00041"></a>00041 <a class="code" href="classinstructionsimple.html">instructionsimple</a>(<span class="keywordtype">string</span> typ,<span class="keywordtype">string</span> instr, <a class="code" href="classfonction.html">fonction</a> * f, <span class="keywordtype">bool</span> valid); <span class="comment">//verifie au passage la validité de l&#39;instruction</span>
<a name="l00042"></a>00042 
<a name="l00046"></a>00046 <span class="keywordtype">string</span> translate();
<a name="l00047"></a>00047 
<a name="l00051"></a>00051 <span class="keywordtype">void</span> printInst();
<a name="l00052"></a>00052 
<a name="l00060"></a>00060 <span class="keywordtype">void</span> VDeclare();
<a name="l00061"></a>00061 
<a name="l00069"></a>00069 <span class="keywordtype">void</span> VAffecte();
<a name="l00070"></a>00070 
<a name="l00077"></a>00077 <span class="keywordtype">void</span> VAffiche();
<a name="l00078"></a>00078 
<a name="l00086"></a>00086 <span class="keywordtype">void</span> VAppel();
<a name="l00087"></a>00087 
<a name="l00094"></a>00094 <span class="keywordtype">void</span> VRetour();
<a name="l00095"></a>00095 
<a name="l00102"></a>00102 <span class="keywordtype">void</span> VRepete();
<a name="l00103"></a>00103 
<a name="l00110"></a>00110 <span class="keywordtype">bool</span> <a class="code" href="programme_8cpp.html#a1f796ee34e2718117cd5479bb6ddd6a0">isID</a>(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; <span class="keywordtype">id</span>);
<a name="l00111"></a>00111 
<a name="l00118"></a>00118 <span class="keywordtype">bool</span> isOpBin(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; op);
<a name="l00119"></a>00119 
<a name="l00126"></a>00126 <span class="keywordtype">bool</span> isNumber(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; arg1);
<a name="l00127"></a>00127 
<a name="l00134"></a>00134 <span class="keywordtype">bool</span> isExpression(<span class="keyword">const</span> <span class="keywordtype">string</span> &amp; arg);
<a name="l00135"></a>00135 
<a name="l00142"></a>00142 <span class="keywordtype">bool</span> isChaine(<span class="keyword">const</span> <span class="keywordtype">string</span> &amp; arg);
<a name="l00143"></a>00143 
<a name="l00149"></a>00149 <span class="keywordtype">bool</span> isValid();
<a name="l00150"></a>00150 
<a name="l00158"></a>00158 <span class="keywordtype">void</span> tokenize(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; str, vector&lt;string&gt;&amp; tokens, <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; delimiters = <span class="stringliteral">&quot; &quot;</span> );
<a name="l00159"></a>00159 
<a name="l00165"></a>00165 <span class="keywordtype">string</span> translateExpression(<span class="keyword">const</span> <span class="keywordtype">string</span> &amp; arg);
<a name="l00166"></a>00166 };
<a name="l00167"></a>00167 
<a name="l00168"></a>00168 <span class="preprocessor">#endif </span>
</pre></div></div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Fri Dec 21 2012 16:06:20 for LOBO by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
